﻿/**************************************************************
*作者：Leon
*创建时间：2021/12/26 14:50:35
**************************************************************/
using Microsoft.EntityFrameworkCore;

namespace StudentManagement.Models
{
    public static class ModelBuilderExtensions
    {
        public static void Seed(this ModelBuilder modelBuilder)
        {
            modelBuilder.Entity<Student>().HasData(new Student
            {
                Name = "Leon",
                ClassName = ClassNameEnum.FistGrade,
                Email = "Leon@163.com",
                Id = 1
            });
        }
    }
}
